package com.megvii.koala.data.manager;

import com.megvii.corelib.util.DateTimeUtil;
import com.megvii.koala.data.bean.HistoryBean;

/**
 * Created by linyue on 15/12/24.
 */
public class HistoryManager extends KoalaBeanManager<HistoryBean>
{
    @Override
    protected void update(HistoryBean bean, boolean sortAndIndex)
    {
        if (bean != null)
        {
            bean.id = String.valueOf(bean.date);
            bean.date = DateTimeUtil.toMSTimestamp(bean.date);
            bean.check_in_time = DateTimeUtil.toMSTimestamp(bean.check_in_time);
            bean.check_out_time = DateTimeUtil.toMSTimestamp(bean.check_out_time);
        }
        super.update(bean, sortAndIndex);
    }
}
